Rails.application.routes.draw do
  
  
  resources :products do
      resources :comments
    end

  resources :categories do
    resources :products 
  end

  
  match "/admin" => redirect("/casein")
  
  namespace :casein do
		resources :products do
      get 'load_from_excel', :on => :collection
      get 'show_result', :on => :collection
      post 'parse_save_from_excel', :on => :collection
    end
    resources :categories do
      resources :products 
    end

  
    resources :users do
      member do
        put :update_password, :reset_password
      end
    end
    
    resource :user_session
    resource :password_reset, :only => [:create, :edit, :update]
        
    match "/blank" => "casein#blank"
    root :to => "casein#index"
  end
  
end